package com.cskaoyan.mapper;

import com.cskaoyan.bean.Cart;
import com.cskaoyan.bean.Cart;
import com.cskaoyan.bean.CartExample;
import com.cskaoyan.wx.bean.CouponCount;
import com.cskaoyan.wx.bo.CartDeleteBO;
import com.cskaoyan.wx.bo.CartUpdateBO;
import com.cskaoyan.wx.bo.ChooseOrDeleteGoods;
import com.cskaoyan.wx.vo.CartIndexVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CartMapper {

    long countByExample(CartExample example);

    int deleteByExample(CartExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Cart record);

    int insertSelective(Cart record);

    List<Cart> selectByExample(CartExample example);

    Cart selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Cart record, @Param("example") CartExample example);

    int updateByExample(@Param("record") Cart record, @Param("example") CartExample example);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);

    List<CartIndexVO.CartListBean> getCartList(Integer uer_id);

    void updateInfo(@Param("chooseOrDeleteGoods") ChooseOrDeleteGoods chooseOrDeleteGoods);


    Integer getUserId(Integer produceId);

    void updateDeleteCart(@Param("cartDeleteBO") CartDeleteBO cartDeleteBO);

    Integer goodsCount(Integer userId);


    int upsert(@Param("cart") Cart cart);

    void cartUpdate(@Param("cartUpdateBO") CartUpdateBO cartUpdateBO);

    Cart getCart(@Param("cart") Cart cart);

    int upsertAdd(@Param("cartUpdateBO") CartUpdateBO cartUpdateBO);


    CouponCount getInfo(@Param("couponId") Integer couponId);

    Integer getCategoryId(@Param("goodsId") Integer goodsId);

    Double getFreigtMin();

    Double getFreigt();

    Integer getCouponLength(@Param("userId") Integer userId);


    int getNumber(@Param("cart") Cart cart);

    void updateNumber(@Param("cart") Cart cart);

}